home *** CD-ROM | disk | FTP | other *** search
- #9 24-MAY-1993 10:38:23.57 MAIL
- From: IN%"rme@bdk.tue.nl"
- To: IN%"spe@bdk.tue.nl"
- CC:
- Subj: PARALLEL PORT INFO (that everybody has been waiting for?)
-
- --- Forwarded message follows ---
- From: angel@Foghorn_Leghorn.coe.northeastern.edu (Angel at large)
- Subject: PARALLEL PORT INFO (that everybody has been waiting for?)
- Date: Sat, 22 May 1993 20:54:27 GMT
- There was a lot of interest in the technical aspects of parallel port
- interface, so I decide to port this. Please, no flames, but corrections are
- welcome. I will keep this file, because this is the second time people asked
- for this info (maybe I'll become alt.parallel-port.interface-faq :), and I'l
- include any corrections or additions... If you know any other newsgroups it
- should be posted to, let me know...
-
-
- ---- snip? -----
- ============================================================================
- Hardware specifications:
- This is what each pin on the parallel DB25 port does
- source: ComputerCraft Magazine
-
- PIN TYPE FUNCTION
- 1 IO -Strobe
- 2 IO Data bit 0
- 3 IO Bata bit 1
- 4 IO Data bit 2
- 5 IO Data bit 3
- 6 IO Data bit 4
- 7 IO Data bit 5
- 8 IO Data bit 6
- 7 IO Data bit 7
- 10 I -Acknowledge
- 11 I Busy
- 12 I Paper end/empty
- 13 I Select
- 14 O -Auto Feed
- 15 O -Error/Oscillator
- 16 O -Initialize printer
- 17 O -Select Input
- 18-25 GND Ground
-
- This is what you can/need to pull from the pins:
-
- 1. To SWITCH from logical 1 to logical 0 on a BI-DIRECTIONAL parallel
- port you need to pull 20-40mA
- 2. The Maximum safe limit of current you can pull off
- NON-bi-directional port is 2.6mA, but it can sink 24mA
-
- Source: Assembled from ComputerCraft Magazine
-
- Explanations:
- There are two types of parallel ports: bidirectional and
- unidirectional. In a bidirectional port you can use some pins for
- input (like data pins) if you write 1s to them and then pull them low.
- On a non-bidirectional port, you can destroy it that way.
-
- =========================================================================
- Software information:
- IO port location:
- Parallel 1:
- Data port 278h
- Status port 279h
- Control port 27Ah
- Parallel 2:
- Data port 378h
- Status port 379h
- Control port 37Ah
- Parallel 3:
- Data port 3BCh
- Status port 3BDh
- Control port 3BEh
-
- IO port functions:
- Data port
- this port controls the data pins directly. Can also
- be read if you write FFh to it and then pull it low
- externally IF YOU HAVE A BIDIRECTIONAL PORT.
- Status Port:
- Bit 7 = 0 Busy
- Bit 6 = 0 Acknowledge
- Bit 5 = 1 Out or paper
- Bit 4 = 1 Printer is selected
- Bit 3 = 0 Error
- Bit 2 = 0 IRQ has occured
- Bit 1-2 Reserved
- Control Port:
- Bit 4 = 1 Enable IRQ
- Bit 3 = 1 Select Printer
- Bit 2 = 0 Initialize printer
- Bit 1 = 1 Automatic line feed
- Bit 0 = 1 Strobe
-
- -source: Phoenix System BIOS for IBM PC/XT/AT computers and compatibles, First
- edition.
-
- I don't know how all of this pins do to a PRINTER, but they do effect the
- voltage levels on the parallel port. There might be transcription mistakes,
- but nothing that a little experimentation with a voltmeter can't fix. In fact
- I would reccomend to rely on this text as a general guidline and figure
- everything else out through experimentation. For myself, I've written a small
- ASM program that constantly shows me what the values of all ports are, while
- I play with the pins and/or write to the port from another DesqView session.
- Have fun!
-
-
-
- * Angel@foghorn_leghorn.coe.northeastern.edu
- * * * * BTW: These are my opinions, and not that of any other entity
- - * * * * * * ------------------------------------------------------------*
- * * * My god, its full of stars! - Dave
- * I don't know about you, but we've got company! - Epidemic
-